<script setup lang="ts">
import { removeToken } from '@/utils/auth'
import { NButton, NResult } from 'naive-ui'
import router from '@/router'

const goLogin = () => {
  removeToken()
  router.push({ name: 'login' })
}
</script>

<template>
  <NResult status="403" title="401 没有权限">
    <template #footer>
      <n-button @click="goLogin">去登陆</n-button>
    </template>
  </NResult>
</template>

<style scoped>
.n-result {
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  align-items: center;
}
</style>
